﻿using Inovout.Models;
using System.Collections.Generic;

namespace Inovout.Locations
{
    public partial class Location : DataObject
    {
        public Location()
        {
            Children = new DataObjectSet<Location>((location) => { location.Parent = this; });
        }
        public virtual ISet<Location> Children { get; set; }


        private string name;
        public virtual string Name
        {
            get { return name; }
            set
            {
                this.name = value;
                QuanPinName = ConvertToQuanPin(Name);
                JianPinName = ConvertToJianPin(Name);
            }
        }
        public virtual string QuanPinName { get; set; }
        public virtual string JianPinName { get; set; }

        public virtual string EnglishName { get; set; }

        public virtual Location Parent { get; set; }
        public virtual long ZoneCode { get; set; }
        public virtual int? ScopeCode { get; set; }
    }

}
